home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / EDCopy.ed < prev    next >
Text File  |  1996-09-26  |  756b  |  29 lines

  1. /*
  2.  * EDCopy - Copy the marked block to the current clipboard unit.
  3.  *   Assumes ClipTool is running.
  4.  *   You can add it to Ed's EDIT menu if you put
  5.  *   the following command in S:Ed-startup:
  6.  *
  7.  *     SI n 2 "Copy to Clipboard" "rx!EDCopy.ed!"
  8.  *
  9.  *   where n is the menu item number.
  10.  *
  11.  *  You can also add it to a key with something like
  12.  *
  13.  *     SF n "rx!EDCopy.ed!"
  14.  *
  15.  *  where n range from 1 to 57. Please refer to the Ed docs for details.
  16.  */
  17.  
  18. tempfile = 'T:EDCLIP-'pragma('ID')
  19. options failat 21
  20. 'WB!'tempfile'!' /* Tell Ed to write the block */
  21. if rc = 0 then do
  22.     address cliptool 'open filename' tempfile
  23.     address cliptool 'cut'
  24.     address command 'delete quiet force' tempfile
  25.     'SM!Copied!'
  26. end
  27. else 'SM!No block selected!'
  28. exit
  29.